package camel.server.session;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;

import javax.persistence.NamedQuery;

import javax.persistence.Temporal;


@Entity
@NamedQuery(name = "findLobbyEventForMember", query = "SELECT s FROM LobbyEvent s where s.targetMember = :member ORDER BY timeCreated")
public class LobbyEvent {
	private Long id;
	
	private Date timeCreated;
	
	private String targetMember;
	
	@Lob
	private Serializable cmd;

	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Temporal(javax.persistence.TemporalType.TIMESTAMP)
	public Date getTimeCreated() {
		return timeCreated;
	}

	public void setTimeCreated(Date timeCreated) {
		this.timeCreated = timeCreated;
	}

	public Serializable getCmd() {
		return cmd;
	}

	public void setCmd(Serializable cmd) {
		this.cmd = cmd;
	}

	public void setTargetMember(String targetMember) {
		this.targetMember = targetMember;
	}

	public String getTargetMember() {
		return targetMember;
	}
}
